300
|
Can I add any break or divider line
![](images/exlistq300.png)
with AxList1 do
begin
ScrollBySingleLine := False;
Columns.Add('Default');
with Items do
begin
Add('Item 1');
h := Add(Nil);
ItemBreak[h] := EXLISTLib.BreakLineEnum.SingleLine;
SelectableItem[h] := False;
ItemHeight[h] := 6;
Add('Item 3');
end;
end
|
299
|
Can I change the default border of the tooltip, using your EBN files
![](images/exlistq299.png)
with AxList1 do
begin
ToolTipDelay := 1;
ToolTipWidth := 364;
VisualAppearance.Add(1,'c:\exontrol\images\normal.ebn');
set_Background(EXLISTLib.BackgroundPartEnum.exToolTipAppearance,$1000000);
(Columns.Add('tootip') as EXLISTLib.Column).ToolTip := 'this is a tooltip assigned to a column';
end
|
298
|
Can I change the background color for the tooltip
![](images/exlistq298.png)
with AxList1 do
begin
ToolTipDelay := 1;
ToolTipWidth := 364;
set_Background(EXLISTLib.BackgroundPartEnum.exToolTipBackColor,$ff);
(Columns.Add('tootip') as EXLISTLib.Column).ToolTip := 'this is a tooltip assigned to a column';
end
|
297
|
Does the tooltip support HTML format
![](images/exlistq297.png)
with AxList1 do
begin
ToolTipDelay := 1;
ToolTipWidth := 364;
(Columns.Add('tootip') as EXLISTLib.Column).ToolTip := '<font Tahoma;11>T</font>his is an HTML <b>tooltip</b> assigned to a <fgcolor=FF0000>column</fgcolor>';
end
|
296
|
Can I change the forecolor for the tooltip
![](images/exlistq296.png)
with AxList1 do
begin
ToolTipDelay := 1;
ToolTipWidth := 364;
set_Background(EXLISTLib.BackgroundPartEnum.exToolTipForeColor,$ff);
(Columns.Add('tootip') as EXLISTLib.Column).ToolTip := 'this is a tooltip assigned to a column';
end
|
295
|
Can I change the foreground color for the tooltip
![](images/exlistq295.png)
with AxList1 do
begin
ToolTipDelay := 1;
ToolTipWidth := 364;
(Columns.Add('tootip') as EXLISTLib.Column).ToolTip := '<fgcolor=FF0000>this is a tooltip assigned to a column</fgcolor>';
end
|
294
|
Is there any function to limit the height of the items when I display it using multiple lines
![](images/exlistq294.png)
with AxList1 do
begin
ScrollBySingleLine := True;
Columns.Add('C1');
Columns.Add('C2');
with Items do
begin
h := Add('Cell 1');
Caption[h,TObject(1)] := 'This is bit of text that''s shown on multiple lines. This is bit of text that''s shown on multiple lines.';
CellSingleLine[h,TObject(1)] := EXLISTLib.CellSingleLineEnum.exCaptionWordWrap;
ItemMaxHeight[h] := 48;
end;
end
|
293
|
Why I cannot center my cells in the column
![](images/exlistq293.png)
with AxList1 do
begin
DrawGridLines := EXLISTLib.GridLinesEnum.exAllLines;
(Columns.Add('Default') as EXLISTLib.Column).Alignment := EXLISTLib.AlignmentEnum.CenterAlignment;
Items.Add('item 1');
Items.Add('item 2');
Items.Add('item 3');
end
|
292
|
How can I align the cell to the left, center or to the right
![](images/exlistq292.png)
with AxList1 do
begin
DrawGridLines := EXLISTLib.GridLinesEnum.exAllLines;
Columns.Add('Default');
with Items do
begin
CellHAlignment[Add('left'),TObject(0)] := EXLISTLib.AlignmentEnum.LeftAlignment;
CellHAlignment[Add('center'),TObject(0)] := EXLISTLib.AlignmentEnum.CenterAlignment;
CellHAlignment[Add('right'),TObject(0)] := EXLISTLib.AlignmentEnum.RightAlignment;
end;
end
|
291
|
How do I apply HTML format to a cell
![](images/exlistq291.png)
with AxList1 do
begin
Images('gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTql' +
'Vq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0' +
'ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yN' +
'AOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=');
set_HTMLPicture('p1','c:\exontrol\images\zipdisk.gif');
set_HTMLPicture('p2','c:\exontrol\images\auction.gif');
Columns.Add('Default');
with Items do
begin
h := Add('The following item shows some of the HTML format supported:');
CellHAlignment[h,TObject(0)] := EXLISTLib.AlignmentEnum.CenterAlignment;
h := Add('<br>text icons <img>1</img>, <img>2</img>, ... pictures <img>p1</img>, <img>p2</img> <br><br>text <b>bold</b>, <i>italic</i>, <u' +
'>underline</u>, <s>strikeout</s>, ...<br><dotline>and so on...<br> <a>anchor</a> or <a2>hyperlink</a><br><fgcolor=FF0000>fgcolor' +
'</fgcolor> or <bgcolor=00FF00>bgcolor</bgcolor> ');
CaptionFormat[h,TObject(0)] := EXLISTLib.CaptionFormatEnum.exHTML;
CellSingleLine[h,TObject(0)] := EXLISTLib.CellSingleLineEnum.exCaptionWordWrap;
end;
end
|
290
|
How can I change the font for a cell
![](images/exlistq290.png)
with AxList1 do
begin
Columns.Add('Default');
Items.Add('std font');
with Items do
begin
CaptionFormat[Add('this <font tahoma;12>is a bit of text with</font> a different font'),TObject(0)] := EXLISTLib.CaptionFormatEnum.exHTML;
end;
end
|
289
|
How can I change the font for a cell
![](images/exlistq289.png)
with AxList1 do
begin
Columns.Add('Default');
Items.Add('default font');
f := (ComObj.CreateComObject(ComObj.ProgIDToClassID('StdFont')) as stdole.StdFont);
with f do
begin
Name := 'Tahoma';
Size := 12;
end;
with Items do
begin
CellFont[Add('new font'),TObject(0)] := (f as stdole.StdFont);
end;
end
|
288
|
How can I change the font for entire item
![](images/exlistq288.png)
with AxList1 do
begin
Columns.Add('Default');
Items.Add('default font');
f := (ComObj.CreateComObject(ComObj.ProgIDToClassID('StdFont')) as stdole.StdFont);
with f do
begin
Name := 'Tahoma';
Size := 12;
end;
with Items do
begin
ItemFont[Add('new font')] := (f as stdole.StdFont);
end;
end
|
287
|
How do I vertically align a cell
![](images/exlistq287.png)
with AxList1 do
begin
DrawGridLines := EXLISTLib.GridLinesEnum.exAllLines;
(Columns.Add('MultipleLine') as EXLISTLib.Column).Def[EXLISTLib.DefColumnEnum.exCellSingleLine] := TObject(False);
Columns.Add('VAlign');
with Items do
begin
h := Add('This is a bit of long text that should break the line');
Caption[h,TObject(1)] := 'top';
CellVAlignment[h,TObject(1)] := EXLISTLib.VAlignmentEnum.TopAlignment;
h := Add('This is a bit of long text that should break the line');
Caption[h,TObject(1)] := 'middle';
CellVAlignment[h,TObject(1)] := EXLISTLib.VAlignmentEnum.MiddleAlignment;
h := Add('This is a bit of long text that should break the line');
Caption[h,TObject(1)] := 'bottom';
CellVAlignment[h,TObject(1)] := EXLISTLib.VAlignmentEnum.BottomAlignment;
end;
end
|
286
|
How can I change the position of an item
![](images/exlistq286.png)
with AxList1 do
begin
Columns.Add('Default');
with Items do
begin
Add('Item 1');
Add('Item 2');
ItemPosition[Add('Item 3')] := 0;
end;
end
|
285
|
How do I find an item
![](images/exlistq285.png)
with AxList1 do
begin
Columns.Add('Default');
with Items do
begin
Add('Item 1');
Add('Item 2');
Add('Item 3');
ItemBold[FindItem['Item 2',TObject(0),Nil]] := True;
end;
end
|
284
|
How can I insert a hyperlink or an anchor element
![](images/exlistq284.png)
with AxList1 do
begin
Columns.Add('Column');
with Items do
begin
CaptionFormat[Add('Just an <a1>anchor</a> element ...'),TObject(0)] := EXLISTLib.CaptionFormatEnum.exHTML;
end;
with Items do
begin
CaptionFormat[Add('Just another <a2>anchor</a> element ...'),TObject(0)] := EXLISTLib.CaptionFormatEnum.exHTML;
end;
end
|
283
|
How do I find the handle of the item based on its index
![](images/exlistq283.png)
with AxList1 do
begin
Columns.Add('Default');
with Items do
begin
h := Add('Item 1');
Add('Item 2');
Add('Item 3');
ItemBold[1] := True;
end;
end
|
282
|
How can I find the cell being clicked in a radio group
![](images/exlistq282.png)
with AxList1 do
begin
MarkSearchColumn := False;
SelBackColor := Color.FromArgb(255,255,128);
SelForeColor := Color.FromArgb(0,0,0);
Columns.Add('C1');
Columns.Add('C2');
Columns.Add('C3');
with Items do
begin
h := Add('Cell 1');
Caption[h,TObject(1)] := 'Radio 1';
CellHasRadioButton[h,TObject(1)] := True;
CellRadioGroup[h,TObject(1)] := 1234;
Caption[h,TObject(2)] := 'Radio 2';
CellHasRadioButton[h,TObject(2)] := True;
CellRadioGroup[h,TObject(2)] := 1234;
CellState[h,TObject(1)] := 1;
CellChecked(1234,i,c);
CellBold[i,TObject(c)] := True;
end;
end
|
281
|
Can I let the user to resize at runtime the specified item
![](images/exlistq281.png)
with AxList1 do
begin
ScrollBySingleLine := True;
DrawGridLines := EXLISTLib.GridLinesEnum.exAllLines;
Columns.Add('Default');
with Items do
begin
ItemAllowSizing[Add('resizable item')] := True;
Add('not resizable item');
end;
end
|
280
|
How can I change the size ( width, height ) of the picture
![](images/exlistq280.png)
with AxList1 do
begin
Columns.Add('Default');
with Items do
begin
h := Add('Item 1');
CellPicture[h,TObject(0)] := AxList1.ExecuteTemplate('loadpicture(`c:\exontrol\images\zipdisk.gif`)');
CellPictureWidth[h,TObject(0)] := 24;
CellPictureHeight[h,TObject(0)] := 24;
ItemHeight[h] := 32;
h := Add('Item 2');
CellPicture[h,TObject(0)] := AxList1.ExecuteTemplate('loadpicture(`c:\exontrol\images\zipdisk.gif`)');
ItemHeight[h] := 48;
end;
end
|
279
|
How can I find the number or the count of selected items
![](images/exlistq279.png)
with AxList1 do
begin
SingleSel := False;
Columns.Add('Default');
with Items do
begin
h := Add('Item 1');
Add('Item 2');
Add('Item 3');
SelectItem[FirstVisibleItem] := True;
SelectItem[NextVisibleItem[FirstVisibleItem]] := True;
Add(TObject(SelectCount));
end;
end
|
278
|
How do I unselect an item
![](images/exlistq278.png)
with AxList1 do
begin
Columns.Add('Default');
with Items do
begin
h := Add('Item 1');
Add('Item 2');
Add('Item 3');
SelectItem[h] := False;
end;
end
|
277
|
How do I find the selected item
![](images/exlistq277.png)
with AxList1 do
begin
Columns.Add('Default');
with Items do
begin
h := Add('Item 1');
Add('Item 2');
Add('Item 3');
SelectItem[h] := True;
ItemBold[SelectedItem[0]] := True;
end;
end
|
276
|
How do I un select all items
![](images/exlistq276.png)
with AxList1 do
begin
SingleSel := False;
Columns.Add('Default');
with Items do
begin
Add('Item 1');
Add('Item 2');
Add('Item 3');
UnselectAll();
end;
end
|
275
|
How do I select multiple items
![](images/exlistq275.png)
with AxList1 do
begin
SingleSel := False;
Columns.Add('Default');
with Items do
begin
Add('Item 1');
Add('Item 2');
Add('Item 3');
SelectItem[FirstVisibleItem] := True;
SelectItem[NextVisibleItem[FirstVisibleItem]] := True;
end;
end
|
274
|
How do I select all items
![](images/exlistq274.png)
with AxList1 do
begin
SingleSel := False;
Columns.Add('Default');
with Items do
begin
Add('Item 1');
Add('Item 2');
Add('Item 3');
SelectAll();
end;
end
|
273
|
How do I select an item
![](images/exlistq273.png)
with AxList1 do
begin
Columns.Add('Default');
with Items do
begin
Add('Item 1');
Add('Item 2');
Add('Item 3');
SelectItem[NextVisibleItem[FocusItem]] := True;
end;
end
|
272
|
Can I display a button with some picture or icon inside
![](images/exlistq272.png)
with AxList1 do
begin
set_HTMLPicture('p1','c:\exontrol\images\zipdisk.gif');
Columns.Add('C1');
Columns.Add('C2');
with Items do
begin
h := Add('Cell 1');
Caption[h,TObject(1)] := ' Button <img>p1</img> ';
CaptionFormat[h,TObject(1)] := EXLISTLib.CaptionFormatEnum.exHTML;
CellHAlignment[h,TObject(1)] := EXLISTLib.AlignmentEnum.RightAlignment;
CellHasButton[h,TObject(1)] := True;
ItemHeight[h] := 48;
end;
end
|
271
|
Can I display a button with some picture or icon inside
![](images/exlistq271.png)
with AxList1 do
begin
Images('gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTql' +
'Vq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0' +
'ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yN' +
'AOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=');
Columns.Add('C1');
Columns.Add('C2');
with Items do
begin
h := Add('Cell 1');
Caption[h,TObject(1)] := ' Button <img>1</img> ';
CaptionFormat[h,TObject(1)] := EXLISTLib.CaptionFormatEnum.exHTML;
CellHAlignment[h,TObject(1)] := EXLISTLib.AlignmentEnum.RightAlignment;
CellHasButton[h,TObject(1)] := True;
end;
end
|
270
|
Can I display a button with some icon inside
![](images/exlistq270.png)
with AxList1 do
begin
Images('gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTql' +
'Vq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0' +
'ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yN' +
'AOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=');
Columns.Add('C1');
Columns.Add('C2');
with Items do
begin
h := Add('Cell 1');
Caption[h,TObject(1)] := ' <img>1</img> ';
CaptionFormat[h,TObject(1)] := EXLISTLib.CaptionFormatEnum.exHTML;
CellHAlignment[h,TObject(1)] := EXLISTLib.AlignmentEnum.RightAlignment;
CellHasButton[h,TObject(1)] := True;
end;
end
|
269
|
How can I assign multiple icon/picture to a cell
![](images/exlistq269.png)
with AxList1 do
begin
set_HTMLPicture('p1','c:\exontrol\images\zipdisk.gif');
set_HTMLPicture('p2','c:\exontrol\images\auction.gif');
Columns.Add('Default');
with Items do
begin
h := Add('text <img>p1</img> another picture <img>p2</img> and so on');
CaptionFormat[h,TObject(0)] := EXLISTLib.CaptionFormatEnum.exHTML;
CellPicture[h,TObject(0)] := AxList1.ExecuteTemplate('loadpicture(`c:\exontrol\images\colorize.gif`)');
ItemHeight[h] := 48;
Add('Item 2');
end;
end
|
268
|
How can I assign an icon/picture to a cell
![](images/exlistq268.png)
with AxList1 do
begin
Columns.Add('Default');
with Items do
begin
h := Add('Item 1');
CellPicture[h,TObject(0)] := AxList1.ExecuteTemplate('loadpicture(`c:\exontrol\images\zipdisk.gif`)');
ItemHeight[h] := 48;
Add('Item 2');
end;
end
|
267
|
How can I assign multiple icons/pictures to a cell
![](images/exlistq267.png)
with AxList1 do
begin
Images('gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTql' +
'Vq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0' +
'ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yN' +
'AOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=');
Columns.Add('Default');
with Items do
begin
h := Add('Item <img>1</img> 1, <img>2</img>, ... and so on ');
CaptionFormat[h,TObject(0)] := EXLISTLib.CaptionFormatEnum.exHTML;
end;
end
|
266
|
How can I assign multiple icons/pictures to a cell
![](images/exlistq266.png)
with AxList1 do
begin
Images('gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTql' +
'Vq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0' +
'ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yN' +
'AOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=');
Columns.Add('Default');
with Items do
begin
h := Add('Item 1');
CellImages[h,TObject(0)] := '1,2,3';
end;
end
|
265
|
How can I assign an icon/picture to a cell
![](images/exlistq265.png)
with AxList1 do
begin
Images('gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTql' +
'Vq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0' +
'ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yN' +
'AOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=');
Columns.Add('Default');
with Items do
begin
h := Add('Item 1');
CellImage[h,TObject(0)] := 1;
CellImage[Add('Item 2'),TObject(0)] := 2;
CellImage[Add('Item 3'),TObject(0)] := 3;
end;
end
|
264
|
How can I display a button inside the item or cell
![](images/exlistq264.png)
with AxList1 do
begin
Columns.Add('C1');
Columns.Add('C2');
with Items do
begin
h := Add('Cell 1');
Caption[h,TObject(1)] := ' Button 1 ';
CellHAlignment[h,TObject(1)] := EXLISTLib.AlignmentEnum.RightAlignment;
CellHasButton[h,TObject(1)] := True;
h := Add('Cell 2');
Caption[h,TObject(1)] := ' Button 2 ';
CellHAlignment[h,TObject(1)] := EXLISTLib.AlignmentEnum.CenterAlignment;
CellHasButton[h,TObject(1)] := True;
end;
end
|
263
|
How can I change the state of a radio button
![](images/exlistq263.png)
with AxList1 do
begin
MarkSearchColumn := False;
SelBackColor := Color.FromArgb(255,255,128);
SelForeColor := Color.FromArgb(0,0,0);
Columns.Add('C1');
Columns.Add('C2');
Columns.Add('C3');
with Items do
begin
h := Add('Cell 1');
Caption[h,TObject(1)] := 'Radio 1';
CellHasRadioButton[h,TObject(1)] := True;
CellRadioGroup[h,TObject(1)] := 1234;
Caption[h,TObject(2)] := 'Radio 2';
CellHasRadioButton[h,TObject(2)] := True;
CellRadioGroup[h,TObject(2)] := 1234;
CellState[h,TObject(1)] := 1;
end;
end
|
262
|
How can I assign a radio button to a cell
![](images/exlistq262.png)
with AxList1 do
begin
MarkSearchColumn := False;
SelBackColor := Color.FromArgb(255,255,128);
SelForeColor := Color.FromArgb(0,0,0);
Columns.Add('C1');
Columns.Add('C2');
Columns.Add('C3');
with Items do
begin
h := Add('Cell 1');
Caption[h,TObject(1)] := 'Radio 1';
CellHasRadioButton[h,TObject(1)] := True;
CellRadioGroup[h,TObject(1)] := 1234;
Caption[h,TObject(2)] := 'Radio 2';
CellHasRadioButton[h,TObject(2)] := True;
CellRadioGroup[h,TObject(2)] := 1234;
CellState[h,TObject(1)] := 1;
end;
end
|
261
|
How can I change the state of a checkbox
![](images/exlistq261.png)
with AxList1 do
begin
Columns.Add('C1');
Columns.Add('C2');
with Items do
begin
h := Add('Cell 1');
Caption[h,TObject(1)] := 'Check Box';
CellHasCheckBox[h,TObject(1)] := True;
CellState[h,TObject(1)] := 1;
end;
end
|
260
|
How can I assign a checkbox to a cell
![](images/exlistq260.png)
with AxList1 do
begin
Columns.Add('C1');
Columns.Add('C2');
with Items do
begin
h := Add('Cell 1');
Caption[h,TObject(1)] := 'Check Box';
CellHasCheckBox[h,TObject(1)] := True;
end;
end
|
259
|
How can I display an item or a cell on multiple lines
![](images/exlistq259.png)
with AxList1 do
begin
ScrollBySingleLine := True;
Columns.Add('C1');
Columns.Add('C2');
with Items do
begin
h := Add('Cell 1');
Caption[h,TObject(1)] := 'This is bit of text that''s shown on multiple lines';
CellSingleLine[h,TObject(1)] := EXLISTLib.CellSingleLineEnum.exCaptionWordWrap;
end;
end
|
258
|
How can I assign a tooltip to a cell
![](images/exlistq258.png)
with AxList1 do
begin
Columns.Add('C1');
Columns.Add('C2');
with Items do
begin
h := Add('Cell 1');
Caption[h,TObject(1)] := 'tooltip';
CellToolTip[h,TObject(1)] := 'This is bit of text that''s shown when the user hovers the cell';
end;
end
|
257
|
How can I associate an extra data to a cell
![](images/exlistq257.png)
with AxList1 do
begin
Columns.Add('C1');
Columns.Add('C2');
with Items do
begin
h := Add('Cell 1');
Caption[h,TObject(1)] := 'Cell 2';
CellData[h,TObject(1)] := 'your extra data';
end;
end
|
256
|
How do I enable or disable a cell
![](images/exlistq256.png)
with AxList1 do
begin
Columns.Add('C1');
Columns.Add('C2');
with Items do
begin
h := Add('Cell 1');
Caption[h,TObject(1)] := 'Cell 2';
CellEnabled[h,TObject(1)] := False;
end;
end
|
255
|
How do I change the cell's foreground color
![](images/exlistq255.png)
with AxList1 do
begin
Columns.Add('C1');
Columns.Add('C2');
with Items do
begin
h := Add('Cell 1');
Caption[h,TObject(1)] := 'Cell 2';
CellForeColor[h,TObject(1)] := $ff;
end;
end
|
254
|
How do I change the visual effect for the cell, using your EBN files
![](images/exlistq254.png)
with AxList1 do
begin
VisualAppearance.Add(1,'c:\exontrol\images\normal.ebn');
Columns.Add('C1');
Columns.Add('C2');
with Items do
begin
h := Add('Cell 1');
Caption[h,TObject(1)] := 'Cell 2';
CellBackColor[h,TObject(1)] := $1000000;
end;
end
|
253
|
How do I change the cell's background color
![](images/exlistq253.png)
with AxList1 do
begin
Columns.Add('C1');
Columns.Add('C2');
with Items do
begin
h := Add('Cell 1');
Caption[h,TObject(1)] := 'Cell 2';
CellBackColor[h,TObject(1)] := $ff;
end;
end
|
252
|
How do I change the caption or value for a particular cell
![](images/exlistq252.png)
with AxList1 do
begin
Columns.Add('C1');
Columns.Add('C2');
with Items do
begin
Caption[Add('Cell 1'),TObject(1)] := 'Cell 2';
end;
end
|
251
|
How do I retrieve the focused item
![](images/exlistq251.png)
with AxList1 do
begin
Columns.Add('Default');
with Items do
begin
Add('Item 1');
Add('Item 2');
Add('Item 3');
ItemBold[FocusItem] := True;
end;
end
|
250
|
How do I enumerate the visible items
![](images/exlistq250.png)
with AxList1 do
begin
Columns.Add('Default');
with Items do
begin
h := Add('Item 1');
h := Add('Item 2');
ItemBold[FirstVisibleItem] := True;
ItemBold[NextVisibleItem[FirstVisibleItem]] := True;
end;
end
|
249
|
How can I make an item unselectable, or not selectable
![](images/exlistq249.png)
with AxList1 do
begin
Columns.Add('Column');
with Items do
begin
h := Add('unselectable - you can''t get selected');
SelectableItem[h] := False;
Add('selectable');
end;
end
|
248
|
How can I hide or show an item
![](images/exlistq248.png)
with AxList1 do
begin
Columns.Add('Column');
with Items do
begin
h := Add('hidden');
ItemHeight[h] := 0;
SelectableItem[h] := False;
Add('visible');
end;
end
|
247
|
How can I change the height for all items
![](images/exlistq247.png)
with AxList1 do
begin
DefaultItemHeight := 32;
Columns.Add('Column');
Items.Add('One');
Items.Add('Two');
end
|
246
|
How do I change the height of an item
![](images/exlistq246.png)
with AxList1 do
begin
ScrollBySingleLine := True;
Columns.Add('Default');
with Items do
begin
ItemHeight[Add('height')] := 128;
end;
Items.Add('enabled');
end
|
245
|
How do I disable or enable an item
![](images/exlistq245.png)
with AxList1 do
begin
Columns.Add('Default');
with Items do
begin
EnableItem[Add('disabled')] := False;
end;
Items.Add('enabled');
end
|
244
|
How do I display as strikeout a cell
![](images/exlistq244.png)
with AxList1 do
begin
Columns.Add('Default');
with Items do
begin
CellStrikeOut[Add('strikeout'),TObject(0)] := True;
end;
end
|
243
|
How do I display as strikeout a cell or an item
![](images/exlistq243.png)
with AxList1 do
begin
Columns.Add('Default');
with Items do
begin
CaptionFormat[Add('gets <s>strikeout</s> only a portion of text'),TObject(0)] := EXLISTLib.CaptionFormatEnum.exHTML;
end;
end
|
242
|
How do I display as strikeout an item
![](images/exlistq242.png)
with AxList1 do
begin
Columns.Add('Default');
with Items do
begin
ItemStrikeOut[Add('strikeout')] := True;
end;
end
|
241
|
How do I underline a cell
![](images/exlistq241.png)
with AxList1 do
begin
Columns.Add('Default');
with Items do
begin
CellUnderline[Add('underline'),TObject(0)] := True;
end;
end
|
240
|
How do I underline a cell or an item
![](images/exlistq240.png)
with AxList1 do
begin
Columns.Add('Default');
with Items do
begin
CaptionFormat[Add('gets <u>underline</u> only a portion of text'),TObject(0)] := EXLISTLib.CaptionFormatEnum.exHTML;
end;
end
|
239
|
How do I underline an item
![](images/exlistq239.png)
with AxList1 do
begin
Columns.Add('Default');
with Items do
begin
ItemUnderline[Add('underline')] := True;
end;
end
|
238
|
How do I display as italic a cell
![](images/exlistq238.png)
with AxList1 do
begin
Columns.Add('Default');
with Items do
begin
CellItalic[Add('italic'),TObject(0)] := True;
end;
end
|
237
|
How do I display as italic a cell or an item
![](images/exlistq237.png)
with AxList1 do
begin
Columns.Add('Default');
with Items do
begin
CaptionFormat[Add('gets <i>italic</i> only a portion of text'),TObject(0)] := EXLISTLib.CaptionFormatEnum.exHTML;
end;
end
|
236
|
How do I display as italic an item
![](images/exlistq236.png)
with AxList1 do
begin
Columns.Add('Default');
with Items do
begin
ItemItalic[Add('italic')] := True;
end;
end
|
235
|
How do I bold a cell
![](images/exlistq235.png)
with AxList1 do
begin
Columns.Add('Default');
with Items do
begin
CellBold[Add('bold'),TObject(0)] := True;
end;
end
|
234
|
How do I bold a cell or an item
![](images/exlistq234.png)
with AxList1 do
begin
Columns.Add('Default');
with Items do
begin
CaptionFormat[Add('gets <b>bold</b> only a portion of text'),TObject(0)] := EXLISTLib.CaptionFormatEnum.exHTML;
end;
end
|
233
|
How do I bold an item
![](images/exlistq233.png)
with AxList1 do
begin
Columns.Add('Default');
with Items do
begin
ItemBold[Add('bold')] := True;
end;
end
|
232
|
How do I change the foreground color for the item
![](images/exlistq232.png)
with AxList1 do
begin
Columns.Add('Default');
with Items do
begin
ItemForeColor[Add('Item')] := $ff;
end;
end
|
231
|
How do I change the visual appearance for the item, using your EBN technology
![](images/exlistq231.png)
with AxList1 do
begin
VisualAppearance.Add(1,'c:\exontrol\images\normal.ebn');
Columns.Add('Default');
with Items do
begin
ItemBackColor[Add('Item')] := $1000000;
end;
end
|
230
|
How do I change the background color for the item
![](images/exlistq230.png)
with AxList1 do
begin
Columns.Add('Default');
with Items do
begin
ItemBackColor[Add('Item')] := $ff;
end;
end
|
229
|
How do I associate an extra data to an item
![](images/exlistq229.png)
with AxList1 do
begin
Columns.Add('Default');
with Items do
begin
ItemData[Add('item')] := 'your extra data';
end;
end
|
228
|
How do I programmatically edit a cell
![](images/exlistq228.png)
// AfterCellEdit event - Occurs after data in the current cell is edited.
procedure TWinForm1.AxList1_AfterCellEdit(sender: System.Object; e: AxEXLISTLib._IListEvents_AfterCellEditEvent);
begin
with AxList1 do
begin
with Items do
begin
Caption[e.itemIndex,TObject(e.colIndex)] := TObject(e.newCaption);
end;
end
end;
// CancelCellEdit event - Occurs if the edit operation is canceled.
procedure TWinForm1.AxList1_CancelCellEdit(sender: System.Object; e: AxEXLISTLib._IListEvents_CancelCellEditEvent);
begin
with AxList1 do
begin
with Items do
begin
Caption[e.itemIndex,TObject(e.colIndex)] := TObject(e.reserved);
end;
end
end;
// Click event - Occurs when the user presses and then releases the left mouse button over the list control.
procedure TWinForm1.AxList1_ClickEvent(sender: System.Object; e: System.EventArgs);
begin
with AxList1 do
begin
with Items do
begin
Edit(FocusItem,TObject(0));
end;
end
end;
with AxList1 do
begin
AllowEdit := True;
Columns.Add('Default');
with Items do
begin
Add('');
end;
end
|
227
|
How can I ensure or scroll the control so the item fits the control's client area
![](images/exlistq227.png)
with AxList1 do
begin
Columns.Add('Default');
h := Items.Add('item');
Items.EnsureVisibleItem(h);
end
|
226
|
How can I remove or delete all items
with AxList1 do
begin
Columns.Add('Default');
Items.Add('removed item');
Items.RemoveAll();
end
|
225
|
How can I remove or delete an item
with AxList1 do
begin
Columns.Add('Default');
h := Items.Add('removed item');
Items.Remove(h);
end
|
224
|
How can I add or insert an item
![](images/exlistq224.png)
with AxList1 do
begin
Columns.Add('C1');
Columns.Add('C2');
with Items do
begin
Caption[Add('Cell 1'),TObject(1)] := 'Cell 2';
h := Add('Cell 3');
Caption[h,TObject(1)] := 'Cell 4';
end;
end
|
223
|
How can I add or insert an item
![](images/exlistq223.png)
with AxList1 do
begin
Columns.Add('Default');
Items.Add('new item');
end
|
222
|
How can I get the columns as they are shown in the control's sortbar
with AxList1 do
begin
var_Object := (Columns.ItemBySortPosition[TObject(0)] as Object);
end
|
221
|
How can I access the properties of a column
![](images/exlistq221.png)
with AxList1 do
begin
Columns.Add('A');
Columns.Item['A'].HeaderBold := True;
end
|
220
|
How can I remove all the columns
with AxList1 do
begin
Columns.Clear();
end
|
219
|
How can I remove a column
with AxList1 do
begin
Columns.Remove('A');
end
|
218
|
How can I get the number or the count of columns
with AxList1 do
begin
var_Count := Columns.Count;
end
|
217
|
How can I change the font for all cells in the entire column
![](images/exlistq217.png)
with AxList1 do
begin
f := (ComObj.CreateComObject(ComObj.ProgIDToClassID('StdFont')) as stdole.StdFont);
with f do
begin
Name := 'Tahoma';
Size := 12;
end;
with ConditionalFormats.Add('1',Nil) do
begin
Font := (f as stdole.StdFont);
ApplyTo := EXLISTLib.FormatApplyToEnum.exFormatToColumns;
end;
Columns.Add('Column');
Items.Add(TObject(0));
Items.Add(TObject(1));
end
|
216
|
How can I change the background color for all cells in the column
![](images/exlistq216.png)
with AxList1 do
begin
var_ConditionalFormat := ConditionalFormats.Add('1',Nil);
with var_ConditionalFormat do
begin
BackColor := $ff;
ApplyTo := EXLISTLib.FormatApplyToEnum.exFormatToColumns;
end;
Columns.Add('Column');
Items.Add(TObject(0));
Items.Add(TObject(1));
end
|
215
|
How can I change the foreground color for all cells in the column
![](images/exlistq215.png)
with AxList1 do
begin
var_ConditionalFormat := ConditionalFormats.Add('1',Nil);
with var_ConditionalFormat do
begin
ForeColor := $ff;
ApplyTo := EXLISTLib.FormatApplyToEnum.exFormatToColumns;
end;
Columns.Add('Column');
Items.Add(TObject(0));
Items.Add(TObject(1));
end
|
214
|
How can I show as strikeout all cells in the column
![](images/exlistq214.png)
with AxList1 do
begin
var_ConditionalFormat := ConditionalFormats.Add('1',Nil);
with var_ConditionalFormat do
begin
StrikeOut := True;
ApplyTo := EXLISTLib.FormatApplyToEnum.exFormatToColumns;
end;
Columns.Add('Column');
Items.Add(TObject(0));
Items.Add(TObject(1));
end
|
213
|
How can I underline all cells in the column
![](images/exlistq213.png)
with AxList1 do
begin
var_ConditionalFormat := ConditionalFormats.Add('1',Nil);
with var_ConditionalFormat do
begin
Underline := True;
ApplyTo := EXLISTLib.FormatApplyToEnum.exFormatToColumns;
end;
Columns.Add('Column');
Items.Add(TObject(0));
Items.Add(TObject(1));
end
|
212
|
How can I show in italic all data in the column
![](images/exlistq212.png)
with AxList1 do
begin
var_ConditionalFormat := ConditionalFormats.Add('1',Nil);
with var_ConditionalFormat do
begin
Italic := True;
ApplyTo := EXLISTLib.FormatApplyToEnum.exFormatToColumns;
end;
Columns.Add('Column');
Items.Add(TObject(0));
Items.Add(TObject(1));
end
|
211
|
How can I bold the entire column
![](images/exlistq211.png)
with AxList1 do
begin
var_ConditionalFormat := ConditionalFormats.Add('1',Nil);
with var_ConditionalFormat do
begin
Bold := True;
ApplyTo := EXLISTLib.FormatApplyToEnum.exFormatToColumns;
end;
Columns.Add('Column');
Items.Add(TObject(0));
Items.Add(TObject(1));
end
|
210
|
How can I display a computed column and highlight some values that are negative or less than a value
![](images/exlistq210.png)
with AxList1 do
begin
Columns.Add('A');
Columns.Add('B');
(Columns.Add('(A+B)*1.19') as EXLISTLib.Column).ComputedField := '(%0 + %1) * 1.19';
with Items do
begin
Caption[Add(TObject(1)),TObject(1)] := TObject(2);
end;
with Items do
begin
Caption[Add(TObject(10)),TObject(1)] := TObject(20);
end;
var_ConditionalFormat := ConditionalFormats.Add('%2 > 10',Nil);
with var_ConditionalFormat do
begin
Bold := True;
ForeColor := $ff;
ApplyTo := EXLISTLib.FormatApplyToEnum($2);
end;
end
|
209
|
Can I display a computed column so it displays the VAT, or SUM
![](images/exlistq209.png)
with AxList1 do
begin
Columns.Add('A');
Columns.Add('B');
(Columns.Add('(A+B)*1.19') as EXLISTLib.Column).ComputedField := '(%0 + %1) * 1.19';
with Items do
begin
Caption[Add(TObject(1)),TObject(1)] := TObject(2);
end;
with Items do
begin
Caption[Add(TObject(10)),TObject(1)] := TObject(20);
end;
end
|
208
|
How can I show a column that adds values in the cells
![](images/exlistq208.png)
with AxList1 do
begin
Columns.Add('A');
Columns.Add('B');
(Columns.Add('A+B') as EXLISTLib.Column).ComputedField := '%0 + %1';
with Items do
begin
Caption[Add(TObject(1)),TObject(1)] := TObject(2);
end;
with Items do
begin
Caption[Add(TObject(10)),TObject(1)] := TObject(20);
end;
end
|
207
|
Is there any function to filter the control's data as I type, so the items being displayed include the typed characters
![](images/exlistq207.png)
with AxList1 do
begin
var_Column := (Columns.Add('Filter') as EXLISTLib.Column);
with var_Column do
begin
FilterOnType := True;
DisplayFilterButton := True;
AutoSearch := EXLISTLib.AutoSearchEnum.exContains;
end;
Items.Add('Canada');
Items.Add('USA');
end
|
206
|
Is there any function to filter the control's data as I type, something like filter on type
![](images/exlistq206.png)
with AxList1 do
begin
var_Column := (Columns.Add('Filter') as EXLISTLib.Column);
with var_Column do
begin
FilterOnType := True;
DisplayFilterButton := True;
end;
Items.Add('Canada');
Items.Add('USA');
end
|
205
|
How can I programmatically filter a column
![](images/exlistq205.png)
with AxList1 do
begin
with (Columns.Add('Filter') as EXLISTLib.Column) do
begin
DisplayFilterButton := True;
FilterType := EXLISTLib.FilterTypeEnum.exNonBlanks;
end;
Items.Add(Nil);
Items.Add('not empty');
ApplyFilter();
end
|
204
|
How can I show or display the control's filter
![](images/exlistq204.png)
with AxList1 do
begin
(Columns.Add('Filter') as EXLISTLib.Column).DisplayFilterButton := True;
end
|
203
|
How can I customize the items being displayed in the drop down filter window
![](images/exlistq203.png)
with AxList1 do
begin
with (Columns.Add('Custom Filter') as EXLISTLib.Column) do
begin
DisplayFilterButton := True;
DisplayFilterPattern := False;
CustomFilter := 'Excel Spreadsheets (*.xls )||*.xls|||Word Documents||*.doc|||Powerpoint Presentations||*.pps|||Text Documents (*.log,*.txt)||*.t' +
'xt|*.log';
FilterType := EXLISTLib.FilterTypeEnum.exPattern;
Filter := '*.xls';
end;
Items.Add('excel.xls');
Items.Add('word.doc');
Items.Add('pp.pps');
Items.Add('text.txt');
ApplyFilter();
end
|
202
|
How can I change the order or the position of the columns in the sort bar
![](images/exlistq202.png)
with AxList1 do
begin
SortBarVisible := True;
SortBarColumnWidth := 48;
(Columns.Add('C1') as EXLISTLib.Column).SortOrder := EXLISTLib.SortOrderEnum.SortAscending;
(Columns.Add('C2') as EXLISTLib.Column).SortOrder := EXLISTLib.SortOrderEnum.SortDescending;
Columns.Item['C2'].SortPosition := 0;
end
|
201
|
How do I arrange my columns on multiple levels
![](images/exlistq201.png)
with AxList1 do
begin
(Columns.Add('S') as EXLISTLib.Column).Width := 32;
(Columns.Add('Level 2') as EXLISTLib.Column).LevelKey := TObject(1);
(Columns.Add('Level 3') as EXLISTLib.Column).LevelKey := TObject(1);
(Columns.Add('Level 4') as EXLISTLib.Column).LevelKey := TObject(1);
(Columns.Add('Level 1') as EXLISTLib.Column).LevelKey := '2';
(Columns.Add('Level 2') as EXLISTLib.Column).LevelKey := '2';
(Columns.Add('Level 3') as EXLISTLib.Column).LevelKey := '2';
(Columns.Add('Level 4') as EXLISTLib.Column).LevelKey := '2';
(Columns.Add('E') as EXLISTLib.Column).Width := 32;
end
|